//Table 5. Triple diff

use "eseewithinfirm.dta", clear

local filename "table5"
xi: xtivreg2 lnval crisisXlonginv i.category , fe cluster(firmid indyear) partial(i.category)
outreg2 using "`filename'", word replace label  nocons dec(3) addtext(Firm*year FEs, YES, Category FEs, YES)
xi: xtivreg2 lnval crisisXlonginv crisisXlonginvXdomfir longinvXdomfir i.category , fe cluster(firmid indyear) partial(i.category)
outreg2 using "`filename'", word  label  nocons dec(3) addtext(Firm*year FEs, YES, Category FEs, YES)
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir i.catyr  , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word  label  nocons dec(3) addtext(Firm*year FEs, YES, Category*year FEs, YES)
xi: xtivreg2 lnval2 crisisXlonginvXdomfir longinvXdomfir i.catyr , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word  label  nocons dec(3) addtext(Firm*year FEs, YES, Category*year FEs, YES, Incl 0s, YES)
